/**
 * Ingenius-Group S.A.S
 *
 * Project: SAU
 * File: EditUserEvent.java
 * Date: 08/02/2011
 */

package com.ingenius.sau.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.ingenius.sau.client.event.EditUserEvent.EditUserEventHandler;

/**
 * Class <strong>EditUserEvent</strong>
 * 
 * @author Jesus David
 * @version 0.1
 */
public class EditUserEvent extends GwtEvent<EditUserEventHandler> {

	public interface EditUserEventHandler extends EventHandler {

		void onEditUser(EditUserEvent event);
	}

	public static Type<EditUserEventHandler> TYPE = new Type<EditUserEventHandler>();

	private final String userId;

	public EditUserEvent(String userId) {
		this.userId = userId;
	}

	public String getUserId() {
		return userId;
	}

	@Override
	public Type<EditUserEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(EditUserEventHandler handler) {
		handler.onEditUser(this);
	}

}
